//
//  VideoCycleView.m
//  Project2
//
//  Created by hundredsandc on 2017/11/6.
//  Copyright © 2017年 hundredsandc. All rights reserved.
//

#import "VideoCycleView.h"

@interface VideoCycleView ()

@property (nonatomic,strong) UIImageView *bgImageView;
@property (nonatomic,strong) UILabel *titleLabel;
@property (nonatomic,strong) UILabel *timeLabel;
@end
@implementation VideoCycleView

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _bgImageView = [[UIImageView alloc]initWithFrame:frame];
        
        [self addSubview:_bgImageView];
        
        UIImageView *videoBtn = [[UIImageView alloc]init];
        videoBtn.image = [UIImage imageNamed:@"vedio_play"];
        videoBtn.frame = CGRectMake((SCREEN_WIDTH-62)/2, (170-65)/2, 65, 65);
        [self addSubview:videoBtn];
        
        _titleLabel = [UIManage createUILabelFrame:CGRectMake(15, frame.size.height-20, 300, 12) withBackColor:nil withTextColor:RGBCOLOR(0xff, 0xff, 0xff) withTextFont:FONT(12) withTextAlignment:NSTextAlignmentLeft withTextContent:nil];
        [self addSubview:_titleLabel];
        
        _timeLabel = [UIManage createUILabelFrame:CGRectMake(SCREEN_WIDTH-60-15, _titleLabel.y, 60, 12) withBackColor:nil withTextColor:RGBCOLOR(0xff, 0xff, 0xff) withTextFont:FONT(12) withTextAlignment:NSTextAlignmentRight withTextContent:nil];
        [self addSubview:_timeLabel];
        
        
        
    }
    return self;
    
}
-(void)customImageUrlStr:(NSString *)urlStr title:(NSString *)title time:(NSString *)time{
    [_bgImageView sd_setImageWithURL:[NSURL URLWithString:urlStr]];
    _titleLabel.text = title;
    _timeLabel.text = time;
}
@end
